import {
  useDialog,
  useLoadingBar,
  useMessage,
  useNotification,
} from "naive-ui";

export default defineComponent({
  name: "GlobalInject",
  setup(_, { slots }) {
    window.$message = useMessage();
    window.$dialog = useDialog();
    window.$notification = useNotification();
    window.$loadingBar = useLoadingBar();
    return () => <>{slots?.default && slots.default()}</>;
  },
});
